/*
 * @Author: 耿远风
 * @Date: 2020-10-16 15:22:11
 * @LastEditors: 耿远风
 * @LastEditTime: 2020-10-19 10:21:09
 * @Description: 
 */
import { Controller, Get, Post, HttpStatus, Body, Query } from '@nestjs/common';
import { CheckLogin } from 'src/base/decorator/login.decorator';
import { post } from 'typegoose';
import { LunBoService } from './lunbo.service';
@Controller('/lunbo')
export class LunBoController {
  constructor(private readonly lunboService: LunBoService) {}
  @Get('/list')
  getList(@Body() body, @Query() query) {
    let { pageNum,pageSize } = body;
    return this.lunboService.lunboList({pageNum,pageSize});
  }

  @Post('/add')
  addNew(@CheckLogin('admin') uid,@Body() body, @Query() query){
    return this.lunboService.addNew(body);
  }
}
